import request from '../utils/request';


/**
 * 获取所有品牌,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getBrandList = query =>{
    return request({
        url:'/common/brand/getBrandList',
        method:'get',
        params:query
    })
};

/**
 * 获取单个品牌
 * @param query
 * @returns {AxiosPromise}
 */
export const getBrandInfo = query =>{
    return request({
        url:'/common/brand/getBrandInfo',
        method:'get',
        params:query
    })
};

/**
 * 保存品牌接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveBrandInfo = data =>{
    return request({
        url:'/common/brand/saveBrandInfo',
        method:'post',
        data
    })
};
/**
 * 更新品牌接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateBrandInfo = data =>{
    return request({
        url:'/common/brand/updateBrandInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除品牌接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBrandInfo = id =>{
    return request({
        url:'/common/brand/delBrandInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除品牌接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchBrandInfo = id =>{
    return request({
        url:'/common/brand/delBatchBrandInfo',
        method:'delete',
        params:{idList:id}
    })
};



